#include "../Header/LogWorkerImpl.h"


LogWorkerImpl::LogWorkerImpl(LOG_LEVEL level, const char *file, const char *fun, int line, time_t cur)
{
    _setLogInfo(level,file,fun,line,cur);
}

LogWorkerImpl::~LogWorkerImpl()
{
}



void LogWorkerImpl::pushLog()
{
  
    auto log_data = std::move(log_buffer_.str());
    if(log_data.empty() || pos_.isEmpty())
        return;
    PrintMgr::instance().pushLog(std::make_tuple(pos_,log_data,level_));
    pos_.clear();
    log_buffer_ = std::stringstream();
}

